/*
 * MathBoard.h
 *
 *  Created on: 2011-6-10
 *      Author: rs
 */

#include "../go/RegionBoard.h"
#include "InfluencePoint.h"

#ifndef MATHBOARD_H_
#define MATHBOARD_H_

class MathBoard{
public:
	MathBoard(){

	}

	MathBoard(const RegionBoard& board);

	void dilation();

	void erosion();

	int getDilation(InfluencePoint p);

	int getErosion(InfluencePoint p);

	int value();

	void display();

	InfluencePointList getNeighbors(InfluencePoint p);

private:

	int max(int x, int y){
		if (x>y)
			return x;
		return y;
	}

	int min(int x, int y){
		if (x<y)
			return x;
		return y;
	}

	int influence[SG_MAX_SIZE+1][SG_MAX_SIZE+1];

};


#endif /* MATHBOARD_H_ */
